package ExamQuestions;
import java.util.*;
public class Question1Extend {
    private static String remove(String str) {       //哈希思想
        boolean[] flg=new boolean[125];       //为了存放所有大写和小写字符
        StringBuilder stringBuilder=new StringBuilder();
        for (int i = 0; i < str.length(); i++) {
            char ch=str.charAt(i);
            if(!flg[ch]) {              //如果这地方没有数据，那么就往这块空间存放一个数据,如果下次还有重复的字符就不会往字符串中增加了
                stringBuilder.append(ch);
                flg[ch]=true;
            }
        }
        return stringBuilder.toString();
    }
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()) {                //为了一直输入
            String str = scanner.nextLine();
            String ret=remove(str);
            System.out.println(ret);
        }
    }
}
